/********************************************************/
/*	Copyright (C) 2012 Gong Li Bin			*/
/*	Project:	MapReduce			*/
/*	Author:		gong_libin			*/
/*	Date:		2012_01_31			*/
/*	File:		MrDsk.h				*/
/********************************************************/

#ifndef _MRDSK_H
#define	_MRDSK_H

#include "MrCmd.h"

#define	MR_IDX_FIL				0x00
#define	MR_IDX_1KB				0x01
#define	MR_IDX_USD				0x02
#define	MR_IDX_AVA				0x03
#define	MR_IDX_USE				0x04
#define	MR_IDX_MNT				0x05

typedef struct tagMrDsk
{
	UINT m_uiTotal;
	UINT m_uiUsed;
	UINT m_uiFree;
	char m_szMount[MR_BUFFER];
}MRDSK_S;

class CMrDsk : public CMrCmd
{
public:
	CMrDsk();
	virtual ~CMrDsk();

	void MrDskInfo(char* pszResult);

	virtual void* MrCmdResultGet();
	virtual void MrCmdResultReset();
	virtual void MrCmdResultSet(void* pResult);

	virtual void MrCmdDisplay();
	virtual void MrCmdInfo(char* pszResult);
	virtual void MrCmdResultInput(UCHAR* puszBuffer, int iLength);
	virtual int MrCmdResultOutput(UCHAR* puszBuffer, USHORT* pusTotal);

private:
	MRDSK_S m_stDsk[MR_CMD];

	void MrDskValFill(UINT* puiLine, void* pVal[], UINT uiSize, UINT* puiIndex);

};

#endif /* _MRDSK_H */
